import type { VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { RoomApi } from '#/api/spa/room';

import { z } from '#/adapter/form';
import { DICT_TYPE, getDictOptions, getRangePickerDefaultProps } from '#/utils';
import { DICT_SPA_TYPE } from '#/utils/dictSpa';

/** 新增/修改的表单 */
export function useFormSchema(): VbenFormSchema[] {
  return [
    {
      fieldName: 'id',
      component: 'Input',
      dependencies: {
        triggerFields: [''],
        show: () => false,
      },
    },
    {
      fieldName: 'roomNumber',
      label: '房间号',
      rules: 'required',
      component: 'Input',
      componentProps: {
        placeholder: '请输入房间号',
      },
    },
    {
      fieldName: 'roomName',
      label: '房间名称',
      component: 'Input',
      componentProps: {
        placeholder: '请输入房间名称',
      },
    },
    {
      fieldName: 'roomType',
      label: '房间类型',
      rules: 'required',
      component: 'Select',
      componentProps: {
        options: getDictOptions(DICT_SPA_TYPE.HandCardStatus, 'string'),
        placeholder: '请选择房间类型',
      },
    },
    {
      fieldName: 'status',
      label: '房间状态',
      rules: 'required',
      component: 'RadioGroup',
      componentProps: {
        options: getDictOptions(DICT_SPA_TYPE.HandCardStatus, 'string'),
        buttonStyle: 'solid',
        optionType: 'button',
      },
    },
    {
      fieldName: 'capacity',
      label: '容纳人数',
      component: 'Input',
      componentProps: {
        placeholder: '请输入容纳人数',
      },
    },
    {
      fieldName: 'occupiedCount',
      label: '当前占用人数',
      component: 'Input',
      componentProps: {
        placeholder: '请输入当前占用人数',
      },
    },
    {
      fieldName: 'handCardId',
      label: '关联手牌ID',
      component: 'Input',
      componentProps: {
        placeholder: '请输入关联手牌ID',
      },
    },
    {
      fieldName: 'currentBookingId',
      label: '当前预约ID',
      component: 'Input',
      componentProps: {
        placeholder: '请输入当前预约ID',
      },
    },
    {
      fieldName: 'openTime',
      label: '开房时间',
      component: 'DatePicker',
      componentProps: {
        showTime: true,
        format: 'YYYY-MM-DD HH:mm:ss',
        valueFormat: 'x',
      },
    },
    {
      fieldName: 'lastCleanTime',
      label: '最后清洁时间',
      component: 'DatePicker',
      componentProps: {
        showTime: true,
        format: 'YYYY-MM-DD HH:mm:ss',
        valueFormat: 'x',
      },
    },
    {
      fieldName: 'nextCleanTime',
      label: '下次清洁时间',
      component: 'DatePicker',
      componentProps: {
        showTime: true,
        format: 'YYYY-MM-DD HH:mm:ss',
        valueFormat: 'x',
      },
    },
    {
      fieldName: 'floor',
      label: '楼层',
      component: 'Input',
      componentProps: {
        placeholder: '请输入楼层',
      },
    },
    {
      fieldName: 'area',
      label: '区域',
      component: 'Input',
      componentProps: {
        placeholder: '请输入区域',
      },
    },
    {
      fieldName: 'equipment',
      label: '设备配置',
      component: 'Input',
      componentProps: {
        placeholder: '请输入设备配置',
      },
    },
    {
      fieldName: 'amenities',
      label: '配套设施',
      component: 'Input',
      componentProps: {
        placeholder: '请输入配套设施',
      },
    },
    {
      fieldName: 'cleaningRequirements',
      label: '清洁要求',
      component: 'Input',
      componentProps: {
        placeholder: '请输入清洁要求',
      },
    },
    {
      fieldName: 'maintenanceSchedule',
      label: '维护计划',
      component: 'Input',
      componentProps: {
        placeholder: '请输入维护计划',
      },
    },
    {
      fieldName: 'notes',
      label: '备注',
      component: 'Input',
      componentProps: {
        placeholder: '请输入备注',
      },
    },
    {
      fieldName: 'orgId',
      label: '组织ID',
      rules: 'required',
      component: 'Input',
      componentProps: {
        placeholder: '请输入组织ID',
      },
    },
    {
      fieldName: 'storeId',
      label: '门店ID',
      rules: 'required',
      component: 'Input',
      componentProps: {
        placeholder: '请输入门店ID',
      },
    },
    {
      fieldName: 'groupID',
      label: '集团ID',
      rules: 'required',
      component: 'Input',
      componentProps: {
        placeholder: '请输入集团ID',
      },
    },
    {
      fieldName: 'pricePerHour',
      label: '每小时价格',
      component: 'Input',
      componentProps: {
        placeholder: '请输入每小时价格',
      },
    },
    {
      fieldName: 'roomSize',
      label: '房间面积(平方米)',
      component: 'Input',
      componentProps: {
        placeholder: '请输入房间面积(平方米)',
      },
    },
    {
      fieldName: 'environmentControl',
      label: '环境控制JSON',
      component: 'Input',
      componentProps: {
        placeholder: '请输入环境控制JSON',
      },
    },
    {
      fieldName: 'iotDevices',
      label: 'IoT设备JSON',
      component: 'Input',
      componentProps: {
        placeholder: '请输入IoT设备JSON',
      },
    },
    {
      fieldName: 'scope',
      label: '权限范围',
      component: 'Input',
      componentProps: {
        placeholder: '请输入权限范围',
      },
    },
    {
      fieldName: 'scoperef',
      label: '权限引用',
      component: 'Input',
      componentProps: {
        placeholder: '请输入权限引用',
      },
    },
  ];
}

/** 列表的字段 */
export function useRoomUsageGridColumns(): VxeTableGridOptions<RoomApi.RoomUsage>['columns'] {
  return [
    {
      field: 'id',
      title: '主键ID',
      minWidth: 120,
    },
    {
      field: 'roomId',
      title: '房间ID',
      minWidth: 120,
    },
    {
      field: 'roomNumber',
      title: '房间号',
      minWidth: 120,
    },
    {
      field: 'billId',
      title: '账单ID',
      minWidth: 120,
    },
    {
      field: 'usageType',
      title: '使用类型',
      minWidth: 120,
    },
    {
      field: 'startTime',
      title: '开始时间',
      minWidth: 120,
      formatter: 'formatDateTime',
    },
    {
      field: 'endTime',
      title: '结束时间',
      minWidth: 120,
      formatter: 'formatDateTime',
    },
    {
      field: 'durationMinutes',
      title: '使用时长(分钟)',
      minWidth: 120,
    },
    {
      field: 'occupancyCount',
      title: '占用人数',
      minWidth: 120,
    },
    {
      field: 'status',
      title: '状态',
      minWidth: 120,
    },
    {
      field: 'operatorId',
      title: '操作员ID',
      minWidth: 120,
    },
    {
      field: 'operatorName',
      title: '操作员姓名',
      minWidth: 120,
    },
    {
      field: 'remarks',
      title: '备注',
      minWidth: 120,
    },
    {
      field: 'createTime',
      title: '创建时间',
      minWidth: 120,
      formatter: 'formatDateTime',
    },
    {
      title: '操作',
      width: 200,
      fixed: 'right',
      slots: { default: 'actions' },
    },
  ];
}
/** 列表的搜索表单 */
export function useRoomUsageGridFormSchema(): VbenFormSchema[] {
  return [
    {
      fieldName: 'roomId',
      label: '房间ID',
      component: 'Input',
      componentProps: {
        allowClear: true,
        placeholder: '请输入房间ID',
      },
    },
    {
      fieldName: 'roomNumber',
      label: '房间号',
      component: 'Input',
      componentProps: {
        allowClear: true,
        placeholder: '请输入房间号',
      },
    },
    {
      fieldName: 'billId',
      label: '账单ID',
      component: 'Input',
      componentProps: {
        allowClear: true,
        placeholder: '请输入账单ID',
      },
    },
    {
      fieldName: 'usageType',
      label: '使用类型',
      component: 'Select',
      componentProps: {
        allowClear: true,
        options: getDictOptions(DICT_SPA_TYPE.HandCardStatus, 'string'),
        placeholder: '请选择使用类型',
      },
    },
    {
      fieldName: 'startTime',
      label: '开始时间',
      component: 'RangePicker',
      componentProps: {
        ...getRangePickerDefaultProps(),
        allowClear: true,
      },
    },
    {
      fieldName: 'endTime',
      label: '结束时间',
      component: 'RangePicker',
      componentProps: {
        ...getRangePickerDefaultProps(),
        allowClear: true,
      },
    },
    {
      fieldName: 'durationMinutes',
      label: '使用时长(分钟)',
      component: 'Input',
      componentProps: {
        allowClear: true,
        placeholder: '请输入使用时长(分钟)',
      },
    },
    {
      fieldName: 'occupancyCount',
      label: '占用人数',
      component: 'Input',
      componentProps: {
        allowClear: true,
        placeholder: '请输入占用人数',
      },
    },
    {
      fieldName: 'status',
      label: '状态',
      component: 'Select',
      componentProps: {
        allowClear: true,
        options: getDictOptions(DICT_SPA_TYPE.HandCardStatus, 'string'),
        placeholder: '请选择状态',
      },
    },
    {
      fieldName: 'operatorId',
      label: '操作员ID',
      component: 'Input',
      componentProps: {
        allowClear: true,
        placeholder: '请输入操作员ID',
      },
    },
    {
      fieldName: 'operatorName',
      label: '操作员姓名',
      component: 'Input',
      componentProps: {
        allowClear: true,
        placeholder: '请输入操作员姓名',
      },
    },
    {
      fieldName: 'remarks',
      label: '备注',
      component: 'Input',
      componentProps: {
        allowClear: true,
        placeholder: '请输入备注',
      },
    },
    {
      fieldName: 'createTime',
      label: '创建时间',
      component: 'RangePicker',
      componentProps: {
        ...getRangePickerDefaultProps(),
        allowClear: true,
      },
    },
  ];
}

/** 列表的搜索表单 */
export function useGridFormSchema(): VbenFormSchema[] {
  return [
    {
      fieldName: 'roomNumber',
      label: '房间号',
      component: 'Input',
      componentProps: {
        allowClear: true,
        placeholder: '请输入房间号',
      },
    },
    {
      fieldName: 'roomName',
      label: '房间名称',
      component: 'Input',
      componentProps: {
        allowClear: true,
        placeholder: '请输入房间名称',
      },
    },
    {
      fieldName: 'roomType',
      label: '房间类型',
      component: 'Select',
      componentProps: {
        allowClear: true,
        options: getDictOptions(DICT_SPA_TYPE.HandCardStatus, 'string'),
        placeholder: '请选择房间类型',
      },
    },
    {
      fieldName: 'status',
      label: '房间状态',
      component: 'Select',
      componentProps: {
        allowClear: true,
        options: getDictOptions(DICT_SPA_TYPE.HandCardStatus, 'string'),
        placeholder: '请选择房间状态',
      },
    },
    {
      fieldName: 'capacity',
      label: '容纳人数',
      component: 'Input',
      componentProps: {
        allowClear: true,
        placeholder: '请输入容纳人数',
      },
    },
    {
      fieldName: 'occupiedCount',
      label: '当前占用人数',
      component: 'Input',
      componentProps: {
        allowClear: true,
        placeholder: '请输入当前占用人数',
      },
    },
    {
      fieldName: 'handCardId',
      label: '关联手牌ID',
      component: 'Input',
      componentProps: {
        allowClear: true,
        placeholder: '请输入关联手牌ID',
      },
    },
    {
      fieldName: 'currentBookingId',
      label: '当前预约ID',
      component: 'Input',
      componentProps: {
        allowClear: true,
        placeholder: '请输入当前预约ID',
      },
    },
    {
      fieldName: 'openTime',
      label: '开房时间',
      component: 'RangePicker',
      componentProps: {
        ...getRangePickerDefaultProps(),
        allowClear: true,
      },
    },
    {
      fieldName: 'lastCleanTime',
      label: '最后清洁时间',
      component: 'RangePicker',
      componentProps: {
        ...getRangePickerDefaultProps(),
        allowClear: true,
      },
    },
    {
      fieldName: 'nextCleanTime',
      label: '下次清洁时间',
      component: 'RangePicker',
      componentProps: {
        ...getRangePickerDefaultProps(),
        allowClear: true,
      },
    },
    {
      fieldName: 'floor',
      label: '楼层',
      component: 'Input',
      componentProps: {
        allowClear: true,
        placeholder: '请输入楼层',
      },
    },
    {
      fieldName: 'area',
      label: '区域',
      component: 'Input',
      componentProps: {
        allowClear: true,
        placeholder: '请输入区域',
      },
    },
    {
      fieldName: 'equipment',
      label: '设备配置',
      component: 'Input',
      componentProps: {
        allowClear: true,
        placeholder: '请输入设备配置',
      },
    },
    {
      fieldName: 'amenities',
      label: '配套设施',
      component: 'Input',
      componentProps: {
        allowClear: true,
        placeholder: '请输入配套设施',
      },
    },
    {
      fieldName: 'cleaningRequirements',
      label: '清洁要求',
      component: 'Input',
      componentProps: {
        allowClear: true,
        placeholder: '请输入清洁要求',
      },
    },
    {
      fieldName: 'maintenanceSchedule',
      label: '维护计划',
      component: 'Input',
      componentProps: {
        allowClear: true,
        placeholder: '请输入维护计划',
      },
    },
    {
      fieldName: 'notes',
      label: '备注',
      component: 'Input',
      componentProps: {
        allowClear: true,
        placeholder: '请输入备注',
      },
    },
    {
      fieldName: 'orgId',
      label: '组织ID',
      component: 'Input',
      componentProps: {
        allowClear: true,
        placeholder: '请输入组织ID',
      },
    },
    {
      fieldName: 'createTime',
      label: '创建时间',
      component: 'RangePicker',
      componentProps: {
        ...getRangePickerDefaultProps(),
        allowClear: true,
      },
    },
    {
      fieldName: 'storeId',
      label: '门店ID',
      component: 'Input',
      componentProps: {
        allowClear: true,
        placeholder: '请输入门店ID',
      },
    },
    {
      fieldName: 'pricePerHour',
      label: '每小时价格',
      component: 'Input',
      componentProps: {
        allowClear: true,
        placeholder: '请输入每小时价格',
      },
    },
    {
      fieldName: 'roomSize',
      label: '房间面积(平方米)',
      component: 'Input',
      componentProps: {
        allowClear: true,
        placeholder: '请输入房间面积(平方米)',
      },
    },
    {
      fieldName: 'environmentControl',
      label: '环境控制JSON',
      component: 'Input',
      componentProps: {
        allowClear: true,
        placeholder: '请输入环境控制JSON',
      },
    },
    {
      fieldName: 'iotDevices',
      label: 'IoT设备JSON',
      component: 'Input',
      componentProps: {
        allowClear: true,
        placeholder: '请输入IoT设备JSON',
      },
    },
    {
      fieldName: 'scope',
      label: '权限范围',
      component: 'Input',
      componentProps: {
        allowClear: true,
        placeholder: '请输入权限范围',
      },
    },
    {
      fieldName: 'scoperef',
      label: '权限引用',
      component: 'Input',
      componentProps: {
        allowClear: true,
        placeholder: '请输入权限引用',
      },
    },
  ];
}

/** 列表的字段 */
export function useGridColumns(): VxeTableGridOptions<RoomApi.Room>['columns'] {
  return [
    {
      field: 'id',
      title: '主键ID',
      minWidth: 120,
      cellRender: {
        name: 'CellDict',
        props: { type: DICT_SPA_TYPE.HandCardStatus },
      },
    },
    {
      field: 'roomNumber',
      title: '房间号',
      minWidth: 120,
      cellRender: {
        name: 'CellDict',
        props: { type: DICT_SPA_TYPE.HandCardStatus },
      },
    },
    {
      field: 'roomName',
      title: '房间名称',
      minWidth: 120,
      cellRender: {
        name: 'CellDict',
        props: { type: DICT_SPA_TYPE.HandCardStatus },
      },
    },
    {
      field: 'roomType',
      title: '房间类型',
      minWidth: 120,
      cellRender: {
        name: 'CellDict',
        props: { type: DICT_SPA_TYPE.HandCardStatus },
      },
    },
    {
      field: 'status',
      title: '房间状态',
      minWidth: 120,
      cellRender: {
        name: 'CellDict',
        props: { type: DICT_SPA_TYPE.HandCardStatus },
      },
    },
    {
      field: 'capacity',
      title: '容纳人数',
      minWidth: 120,
      cellRender: {
        name: 'CellDict',
        props: { type: DICT_SPA_TYPE.HandCardStatus },
      },
    },
    {
      field: 'occupiedCount',
      title: '当前占用人数',
      minWidth: 120,
      cellRender: {
        name: 'CellDict',
        props: { type: DICT_SPA_TYPE.HandCardStatus },
      },
    },
    {
      field: 'handCardId',
      title: '关联手牌ID',
      minWidth: 120,
      cellRender: {
        name: 'CellDict',
        props: { type: DICT_SPA_TYPE.HandCardStatus },
      },
    },
    {
      field: 'currentBookingId',
      title: '当前预约ID',
      minWidth: 120,
      cellRender: {
        name: 'CellDict',
        props: { type: DICT_SPA_TYPE.HandCardStatus },
      },
    },
    {
      field: 'openTime',
      title: '开房时间',
      minWidth: 120,
      formatter: 'formatDateTime',
    },
    {
      field: 'lastCleanTime',
      title: '最后清洁时间',
      minWidth: 120,
      formatter: 'formatDateTime',
    },
    {
      field: 'nextCleanTime',
      title: '下次清洁时间',
      minWidth: 120,
      formatter: 'formatDateTime',
    },
    {
      field: 'floor',
      title: '楼层',
      minWidth: 120,
      cellRender: {
        name: 'CellDict',
        props: { type: DICT_SPA_TYPE.HandCardStatus },
      },
    },
    {
      field: 'area',
      title: '区域',
      minWidth: 120,
      cellRender: {
        name: 'CellDict',
        props: { type: DICT_SPA_TYPE.HandCardStatus },
      },
    },
    {
      field: 'equipment',
      title: '设备配置',
      minWidth: 120,
      cellRender: {
        name: 'CellDict',
        props: { type: DICT_SPA_TYPE.HandCardStatus },
      },
    },
    {
      field: 'amenities',
      title: '配套设施',
      minWidth: 120,
      cellRender: {
        name: 'CellDict',
        props: { type: DICT_SPA_TYPE.HandCardStatus },
      },
    },
    {
      field: 'cleaningRequirements',
      title: '清洁要求',
      minWidth: 120,
      cellRender: {
        name: 'CellDict',
        props: { type: DICT_SPA_TYPE.HandCardStatus },
      },
    },
    {
      field: 'maintenanceSchedule',
      title: '维护计划',
      minWidth: 120,
      cellRender: {
        name: 'CellDict',
        props: { type: DICT_SPA_TYPE.HandCardStatus },
      },
    },
    {
      field: 'notes',
      title: '备注',
      minWidth: 120,
      cellRender: {
        name: 'CellDict',
        props: { type: DICT_SPA_TYPE.HandCardStatus },
      },
    },
    {
      field: 'orgId',
      title: '组织ID',
      minWidth: 120,
      cellRender: {
        name: 'CellDict',
        props: { type: DICT_SPA_TYPE.HandCardStatus },
      },
    },
    {
      field: 'createTime',
      title: '创建时间',
      minWidth: 120,
      formatter: 'formatDateTime',
    },
    {
      field: 'storeId',
      title: '门店ID',
      minWidth: 120,
      cellRender: {
        name: 'CellDict',
        props: { type: DICT_SPA_TYPE.HandCardStatus },
      },
    },
    {
      field: 'pricePerHour',
      title: '每小时价格',
      minWidth: 120,
      cellRender: {
        name: 'CellDict',
        props: { type: DICT_SPA_TYPE.HandCardStatus },
      },
    },
    {
      field: 'roomSize',
      title: '房间面积(平方米)',
      minWidth: 120,
      cellRender: {
        name: 'CellDict',
        props: { type: DICT_SPA_TYPE.HandCardStatus },
      },
    },
    {
      field: 'environmentControl',
      title: '环境控制JSON',
      minWidth: 120,
      cellRender: {
        name: 'CellDict',
        props: { type: DICT_SPA_TYPE.HandCardStatus },
      },
    },
    {
      field: 'iotDevices',
      title: 'IoT设备JSON',
      minWidth: 120,
      cellRender: {
        name: 'CellDict',
        props: { type: DICT_SPA_TYPE.HandCardStatus },
      },
    },
    {
      field: 'scope',
      title: '权限范围',
      minWidth: 120,
      cellRender: {
        name: 'CellDict',
        props: { type: DICT_SPA_TYPE.HandCardStatus },
      },
    },
    {
      field: 'scoperef',
      title: '权限引用',
      minWidth: 120,
      cellRender: {
        name: 'CellDict',
        props: { type: DICT_SPA_TYPE.HandCardStatus },
      },
    },
    {
      title: '操作',
      width: 200,
      fixed: 'right',
      slots: { default: 'actions' },
    },
  ];
}

// ==================== 子表（房间使用记录） ====================

/** 新增/修改列表的字段 */
export function useRoomUsageGridEditColumns(): VxeTableGridOptions<RoomApi.RoomUsage>['columns'] {
  return [
    {
      field: 'roomNumber',
      title: '房间号',
      minWidth: 120,
      slots: { default: 'roomNumber' },
    },
    {
      field: 'billId',
      title: '账单ID',
      minWidth: 120,
      slots: { default: 'billId' },
    },
    {
      field: 'usageType',
      title: '使用类型',
      minWidth: 120,
      slots: { default: 'usageType' },
      params: {
        options: getDictOptions(DICT_SPA_TYPE.HandCardStatus, 'string'),
      },
    },
    {
      field: 'startTime',
      title: '开始时间',
      minWidth: 120,
      slots: { default: 'startTime' },
    },
    {
      field: 'endTime',
      title: '结束时间',
      minWidth: 120,
      slots: { default: 'endTime' },
    },
    {
      field: 'durationMinutes',
      title: '使用时长(分钟)',
      minWidth: 120,
      slots: { default: 'durationMinutes' },
    },
    {
      field: 'occupancyCount',
      title: '占用人数',
      minWidth: 120,
      slots: { default: 'occupancyCount' },
    },
    {
      field: 'status',
      title: '状态',
      minWidth: 120,
      slots: { default: 'status' },
      params: {
        options: getDictOptions(DICT_SPA_TYPE.HandCardStatus, 'string'),
      },
    },
    {
      field: 'operatorId',
      title: '操作员ID',
      minWidth: 120,
      slots: { default: 'operatorId' },
    },
    {
      field: 'operatorName',
      title: '操作员姓名',
      minWidth: 120,
      slots: { default: 'operatorName' },
    },
    {
      field: 'remarks',
      title: '备注',
      minWidth: 120,
      slots: { default: 'remarks' },
    },
    {
      title: '操作',
      width: 200,
      fixed: 'right',
      slots: { default: 'actions' },
    },
  ];
}

// ==================== 子表（SPA房间环境监控） ====================

/** 新增/修改列表的字段 */
export function useRoomEnvironmentGridEditColumns(): VxeTableGridOptions<RoomApi.RoomEnvironment>['columns'] {
  return [
    {
      field: 'monitorTime',
      title: '监控时间',
      minWidth: 120,
      slots: { default: 'monitorTime' },
    },
    {
      field: 'temperature',
      title: '温度(°C)',
      minWidth: 120,
      slots: { default: 'temperature' },
    },
    {
      field: 'humidity',
      title: '湿度(%)',
      minWidth: 120,
      slots: { default: 'humidity' },
    },
    {
      field: 'airQuality',
      title: '空气质量',
      minWidth: 120,
      slots: { default: 'airQuality' },
    },
    {
      field: 'noiseLevel',
      title: '噪音水平(dB)',
      minWidth: 120,
      slots: { default: 'noiseLevel' },
    },
    {
      field: 'lightingLevel',
      title: '光照水平(lux)',
      minWidth: 120,
      slots: { default: 'lightingLevel' },
    },
    {
      field: 'waterTemperature',
      title: '水温(°C)',
      minWidth: 120,
      slots: { default: 'waterTemperature' },
    },
    {
      field: 'waterQuality',
      title: '水质',
      minWidth: 120,
      slots: { default: 'waterQuality' },
    },
    {
      field: 'environmentMetrics',
      title: '环境指标JSON',
      minWidth: 120,
      slots: { default: 'environmentMetrics' },
    },
    {
      field: 'scope',
      title: '权限范围',
      minWidth: 120,
      slots: { default: 'scope' },
    },
    {
      field: 'scoperef',
      title: '权限引用',
      minWidth: 120,
      slots: { default: 'scoperef' },
    },
    {
      field: 'storeId',
      title: '门店ID',
      minWidth: 120,
      slots: { default: 'storeId' },
    },
    {
      title: '操作',
      width: 200,
      fixed: 'right',
      slots: { default: 'actions' },
    },
  ];
}
